<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="be.ac.ua.ecampus.uacmat.entity.*" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Show</title>
	<link rel="stylesheet" type="text/css" href="style.css"/>
</head>

<body>
<header>
	<h1>Syllabus</h1>
</header>
<% final Syllabus syllabus = (Syllabus) request.getAttribute("syllabus"); %>
<div id="body-wrapper">
	<h2><%= syllabus.getDescription() %></h2>
		Price: <%= syllabus.getPrice() %> EUR <br/>
		Academic Year: <%= syllabus.getAcademicYear() %> <br/>
		Number: <%= syllabus.getNumber() %> <br/>
		
		<% if (syllabus.isAvailable()) { %> <br/>
			Available at:
			<ul>
			<% for (final String result : syllabus.getCampuses()) { %>
	        	<li>
	        		<a href="/uacmat/show?type=map&id=<%= result %>"><%= result %></a>
	        	</li>
	    	<% } %>
	    	</ul>
		<% } %>
		
		Used in the following courses:
		<ul>
		<% for (final Course result : syllabus.getCourses()) { %>
	        <li>
	        	<a href="/uacmat/show?type=<%= result.getType() %>&id=<%= result.getId() %>"><%= result.getDescription() %></a>	        
	        </li>
	    <% } %>
	    </ul>
	
</div>
</body>
</html>